/*
 * Copyright (c)  2016, 
 * All rights reserved.
 * SettlementImport.java 2016-06-23 上午10:49
 */

package com.ueboot.weishop.entity.finance;

import com.ueboot.weishop.entity.IDEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/**
 * 描述:对账文件导入结果数据,原始数据
 *
 * @author yangkui create on 2016-06-23.
 * @since 1.0
 */
@Data
@NoArgsConstructor
@Entity(name = "WS_SETTLEMENT_IMPORT")
public class SettlementImport extends IDEntity {

    /* 物理主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "WS_SETTLEMENT_IMPORT")
    @GenericGenerator(name = "WS_SETTLEMENT_IMPORT", strategy = "enhanced-table", parameters = {
            @org.hibernate.annotations.Parameter(name = "table_name", value = "WS_TABLE_SEQUENCE"),
            @org.hibernate.annotations.Parameter(name = "segment_value", value = "WS_SETTLEMENT_IMPORT"),
            @org.hibernate.annotations.Parameter(name = "optimizer", value = "pooled") })
    @Column(name = "ID",columnDefinition = "INT(20) COMMENT 'id主键'",length = 20)
    private Long id;

    /**
     * 结算批次号
     */
    @Column(name = "BATCH_NO",columnDefinition = "VARCHAR(40) COMMENT '结算批次号'",length = 40)
    private String batchNo;
    /**
     * 商家订单号 退款时的原商家订单号
     */
    @Column(name = "ORDER_NO",columnDefinition = "VARCHAR(40) COMMENT '商家订单号 退款时的原商家订单号'",length = 40)
    private String orderNo;
    /**
     * 交易类型 消费|退货|撤销消费
     */
    @Column(name = "TRANS_TYPE",columnDefinition = "VARCHAR(40) COMMENT '交易类型 消费|退货|撤销消费'",length = 40)
    private String transType;
    /**
     * 交易状态
     */
    @Column(name = "TRANS_STATUS",columnDefinition = "VARCHAR(40) COMMENT '交易状态'",length = 40)
    private String transStatus;
    /**
     * 交易对方银行
     */
    @Column(name = "BANK_NAME",columnDefinition = "VARCHAR(200) COMMENT '交易对方银行'",length = 200)
    private String bankName;

    /**
     * 缩略卡号
     */
    @Column(name = "CARD_NO",columnDefinition = "VARCHAR(40) COMMENT '缩略卡号'",length = 40)
    private String cardNo;

    /**
     * 交易金额 数值型，以分为单位，不含小数点,不含正负号
     */
    @Column(name = "PRICE",columnDefinition = "INT(11) COMMENT '交易金额 数值型，以分为单位，不含小数点,不含正负号'",length = 11)
    private Long price;
    /**
     * 手续费 数值型，以分为单位，不含小数点,不含正负号
     */
    @Column(name = "FEE",columnDefinition = "INT(11) COMMENT '手续费 数值型，以分为单位，不含小数点,不含正负号'",length = 11)
    private Long fee;
    /**
     * 交易开始日期 YYYYMMDD字符串
     */
    @Column(name = "TRANS_START_DATE",columnDefinition = "DATE COMMENT '交易开始日期 YYYYMMDD字符串'")
    private Date transStartDate;

    /**
     * 交易开始时间 HHMMSS字符串
     */
    @Column(name = "TRANS_START_TIME",columnDefinition = "DATE COMMENT '交易开始时间 HHMMSS字符串'")
    private Date transStartTime;

    /**
     * 交易结束日期 YYYYMMDD字符串
     */
    @Column(name = "TRANS_END_DATE",columnDefinition = "DATE COMMENT '交易结束日期 YYYYMMDD字符串'")
    private Date transEndDate;

    /**
     * 交易结束时间 HHMMSS字符串
     */
    @Column(name = "TRANS_END_TIME",columnDefinition = "DATE COMMENT '交易结束时间 HHMMSS字符串'")
    private Date transEndTime;

    /**
     * 交割日期 MMDD字符串
     */
    @Column(name = "GIVE_DATE",columnDefinition = "DATE COMMENT '交割日期 MMDD字符串'")
    private Date giveDate;

    /**
     * 结算时间
     */
    @Column(name = "SETTLE_DATE",columnDefinition = "DATE COMMENT '结算时间'")
    private Date settleDate;

    /**
     * 结算金额 数值型，以分为单位，不含小数点,不含正负号
     */
    @Column(name = "SETTLE_AMOUNT",columnDefinition = "INT(11) COMMENT '结算金额 数值型，以分为单位，不含小数点,不含正负号'",length = 11)
    private Long settleAmount;

    /**
     * 结算状态
     */
    @Column(name = "SETTLE_STATUS",columnDefinition = "VARCHAR(40) COMMENT '结算状态'",length = 40)
    private String settleStatus;

    /**
     * 退款流水号
     */
    @Column(name = "REFUND_SEQ_NO",columnDefinition = "VARCHAR(40) COMMENT '退款流水号'",length = 40)
    private String refundSeqNo;

    /**
     * 业务流水号
     */
    @Column(name = "BUSINESS_SEQ_NO",columnDefinition = "VARCHAR(40) COMMENT '业务流水号'",length = 40)
    private String businessSeqNo;

    /**
     * 交易号
     */
    @Column(name = "TRANS_NO",columnDefinition = "VARCHAR(40) COMMENT '交易号'",length = 40)
    private String transNo;

    /**
     * 原交易号
     */
    @Column(name = "EXTERNAL_REF_NUMBER",columnDefinition = "VARCHAR(40) COMMENT '原交易号'",length = 40)
    private String externalRefNumber;


}